@extends('layouts.home')
@section('title','金汇智谷——科技专家库')
@section('content')
	
	<link rel="stylesheet" type="text/css" href="{{asset('resources/views/home/css/teachering.css')}}">
	<link rel="stylesheet" type="text/css" href="{{asset('resources/views/home/css/teacherTeam.css')}}">

	<!-- 主体内容代码开始 -->

	<div class="fruitclass">
		<table>
			<tr>
				<td width="80">所属类型：</td>
				<td>
					<ul id="typeList">
						<script type="text/javascript">
						var typeArr=['不限','高校专家','企业专家'];
						<?php $type=isset($_GET['type'])?$_GET['type']:'不限'; ?>
						var htmlstr='';
						for(var i=0;i<typeArr.length;i++){
							if(typeArr[i]=='{{$type}}'){
								htmlstr+='<li><a href="javascript:;" class="active">'+typeArr[i]+'</a></li>';
							}else{
								htmlstr+='<li><a href="javascript:;">'+typeArr[i]+'</a></li>';
							}
						}
						$('#typeList').html(htmlstr);
						</script>
					</ul>
				</td>
			</tr>
			<tr>
				<td width="80">投资领域：</td>
				<td>
					<ul id="domainList">
						<script type="text/javascript">
						var domainArr=['不限','信息技术','新材料','资源环境','纺织服装','食品营养','装备制造','交通运输','生物医药','现代农业','节能建筑','新能源','科技服务','IT互联网','其他'];
						<?php $domain=isset($_GET['domain'])?$_GET['domain']:'不限'; ?>
						var htmlstr='';
						for(var i=0;i<domainArr.length;i++){
							if(domainArr[i]=='{{$domain}}'){
								htmlstr+='<li><a href="javascript:;" class="active">'+domainArr[i]+'</a></li>';
							}else{
								htmlstr+='<li><a href="javascript:;">'+domainArr[i]+'</a></li>';
							}
						}
						$('#domainList').html(htmlstr);
						</script>
					</ul>
				</td>
			</tr>
			<tr>
				<td width="80">专家职称：</td>
				<td>
					<ul id="titleList">
						<script type="text/javascript">
						var titleArr=['不限','高级工程师','研究院','工程师','教授高级工程师','院士','教授','副教授'];
						<?php $title=isset($_GET['title'])?$_GET['title']:'不限'; ?>
						var htmlstr='';
						for(var i=0;i<titleArr.length;i++){
							if(titleArr[i]=='{{$title}}'){
								htmlstr+='<li><a href="javascript:;" class="active">'+titleArr[i]+'</a></li>';
							}else{
								htmlstr+='<li><a href="javascript:;">'+titleArr[i]+'</a></li>';
							}
						}
						$('#titleList').html(htmlstr);
						</script>
					</ul>
				</td>
			</tr>
			<!-- <tr>
				<td width="80">所在地区：</td>
				<td>
					<ul id="areaList">
						<script type="text/javascript">
						var areaArr=['全国','广东','北京','福建','安徽','重庆','甘肃','广西','贵州','海南','河北','黑龙江','河南','江苏','江西','吉林','辽宁','内蒙古','宁夏','青海','山东','上海','山西','陕西','四川','天津','新疆','西藏','云南','浙江','台湾','香港','澳门'];
						<?php //$area=isset($_GET['area'])?$_GET['area']:'不限'; ?>
						var htmlstr='';
						for(var i=0;i<areaArr.length;i++){
							if(areaArr[i]=='{{--$area--}}'){
								htmlstr+='<li><a href="javascript:;" class="active">'+areaArr[i]+'</a></li>';
							}else{
								htmlstr+='<li><a href="javascript:;">'+areaArr[i]+'</a></li>';
							}
						}
						$('#areaList').html(htmlstr);
						</script>
					</ul>
				</td>
			</tr> -->
		</table>
	</div>

	<script type="text/javascript">
	$(function(){
		$('#typeList li a').click(function(){
			$('#typeList li a').removeClass('active');
			$(this).addClass('active');
			location.href="{{url('expert')}}?type="+$(this).text()+"&domain={{$domain}}&title={{$title}}";
		})
		$('#domainList li a').click(function(){
			$('#domainList li a').removeClass('active');
			$(this).addClass('active');
			location.href="{{url('expert')}}?type={{$type}}&domain="+$(this).text()+"&title={{$title}}";
		})
		$('#titleList li a').click(function(){
			$('#titleList li a').removeClass('active');
			$(this).addClass('active');
			location.href="{{url('expert')}}?type={{$type}}&domain={{$domain}}&title="+$(this).text();
		})
	})
	</script>
	<div class="w100con bggrey">
		<div class="container help">
			<div class="row">
				<div class="col-md-12">
			@foreach($expdata as $e)
			<div class="con_list">
				<a href="{{url('expert/'.$e->exp_id)}}">
					<img src="{{$e->exp_thumb}}" style="max-width:220px;max-height:220px;">
					<div class="con_list_con">
						<div class="name">{{$e->exp_name}}&nbsp;&nbsp;<span>{{$e->exp_title}}</span></div>
						<p>{!!$e->exp_content!!}</p>
						<button class="con_list_btn">查看详情&gt;&gt;</button>
					</div>
				</a>
			</div>
			@endforeach
				</div>
			</div>
		</div>
	</div>	

@endsection
